package com.yang.job.sample1.task;

import com.yang.job.client.annotations.YangJob;
import com.yang.job.core.dto.ResultT;
import com.yang.job.core.execute.IYangJobExecutor;
import com.yang.job.core.execute.YangJobExecuteRequest;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@YangJob
public class TestTask1 implements IYangJobExecutor {
    @Override
    public ResultT execute(YangJobExecuteRequest yangJobExecuteRequest) {
        System.out.println("开启定时任务了，入参为:" + yangJobExecuteRequest + ",now:" + new Date());
        return ResultT.success();
    }
}
